<div class="form-group">
    <label class="col-sm-2 control-label must">设备名称</label>
    <div class="col-sm-8">
        {ifp 'sgoods.edit'}
        <input type="text" class="form-control" name="name" value="{$item['name']}" data-rule-required="true"/>
        {else}
        <div class="form-control-static">
            {$item['name']}
        </div>
        {/if}
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label must">编号</label>
    <div class="col-sm-8">
        {ifp 'sgoods.edit'}
        <input type="text" class="form-control" name="docking_number" value="{$item['docking_number']}" data-rule-required="true"/>
        {else}
        <div class="form-control-static">
            {$item['docking_number']}
        </div>
        {/if}
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label must">密码</label>
    <div class="col-sm-8">
        {ifp 'sgoods.edit'}
        <input type="password" class="form-control" name="password" value="{$item['password']}" data-rule-required="true"/>
        {else}
        <div class="form-control-static">
        </div>
        {/if}
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label">图片</label>
    <div class="col-sm-8">
        {ifp 'sgoods.edit'}
        {php echo tpl_form_field_image('thumb',$item['thumb'],'../addons/mx_shop/static/images/nopic.jpg')}
        {else}
        {if empty($item['thumb'])}
        <img src="../addons/mx_shop/static/images/nopic.jpg" onerror="this.src='../addons/mx_shop/static/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" width="150">
        {else}
        <img src="{php echo tomedia($item['thumb'])}" onerror="this.src='../addons/mx_shop/static/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" width="150">
        {/if}
        {/if}
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label">描述</label>
    <div class="col-sm-8">
        {ifp 'sgoods.edit'}
        <textarea name="description" class="form-control">{$item['description']}</textarea>
        {else}
        <div class="form-control-static">{$item['description']}</div>
        {/if}
    </div>
</div>